package com.itheima.api.mathdemo;

public class SystemDemo {

    public static void main(String[] args) {
        //终止当前运行的java虚拟机,非0表示异常终止
        System.exit(0);
        //返回当前时间(以毫秒为单位)
        long start = System.currentTimeMillis();
        System.out.println("start = " + start);
        long end = System.currentTimeMillis();
        System.out.println("end = " + end);
        System.out.println(end - start);
        //数组copy,所有操作数组的时候都讨考虑索引越界
        //System.arraycopy(数组1,索引开始,数组2,数组2放置索引,复制的长度);
        int[] arr1 = {1,2,3,4,5};
        int[] arr2 = new int[10];

        System.arraycopy(arr1,0,arr2,0,arr1.length);
        for (int i = 0; i < arr2.length; i++) {
            System.out.println("arr2[i] = " + arr2[i]);
        }
    }
}
